package org.csmzxy.class2334;
class student2{
    static String name;
    int age;
    public student2(){
        System.out.println("执行构造方法");
    }
    {
        System.out.println("执行实例代码块");
        age = 18;
    }
    static {
        System.out.println("执行静态代码块");
        name = "张三";
    }
}
public class Example12 {
    public static void main(String[] args){
        student2 s1= new student2();
        System.out.println("name = " + student2.name+ ",age = " + s1.age);
        student2 s2= new student2();
        System.out.println("name = " + student2.name+ ",age = " + s2.age);
        student2 s3= new student2();
        System.out.println("name = " + student2.name+ ",age = " + s3.age);
    }
}
